open(BUFF,"emerge_prod_idMap.csv");
while(<BUFF>)
{
	chomp($_);
	@array=split(',',$_);
	#print @array."\n";
	$hash{$array[0]}=$array[5];
}
open(BUFF,"hapmap_tfam");
while(<BUFF>)
{
        chomp($_);
	@a=split(" ",$_);
	if(exists($hash{$a[0]}))
	{
		$a[1]=$hash{$a[0]};
		$a[0]=$hash{$a[0]};
		$_ =join(" ",@a);
		print $_."\n";
	}
	else
	{
		
		print "NA NA 0 0 1 1\n";	
		#print "not found $_\n";
		#die "not found $_\n";
	}
}
